import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import * as path from "path";

export default defineConfig({
  build: {
    lib: {
      entry: path.resolve(__dirname, 'src/lib/index.js'),
      name:'SagframeCom',
      fileName: format => `sag-vue3-coms.${format}.js`
    },
    minify: false,
    sourcemap: true,
    rollupOptions: {
      external: ['vue','ant-design-vue'],
      output: {
        globals: {
          vue: 'Vue',
          "ant-design-vue": 'AntdV'
        }
      }
    }
  },
  plugins: [vue()]
})
